package com.wenzhi.java_join_kotlin.service.impl

import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

import org.junit.jupiter.api.Assertions.*

class TimeRequiredToBuyServiceImplTest {

    @BeforeEach
    fun setUp() {
    }

    @AfterEach
    fun tearDown() {
    }

    @Test
    fun timeRequiredToBuy() {
        // tickets = [2,3,2], k = 2
        // expected = 6
        val solution = TimeRequiredToBuyServiceImpl()
        val result = solution.timeRequiredToBuy(intArrayOf(2, 3, 2), 2)
        // 格式化输出
        println("result: $result")
        assertEquals(6, result)
    }

}